/**
 * Copyright (c) Software Institute of PKU
 * All rights reserved. 
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 */
package edu.pku.sei.modeler.editparts;

import java.beans.PropertyChangeEvent;

import edu.pku.sei.modeler.edit.parts.BaseTreeEditPart;
import edu.pku.sei.modeler.model.core.CorePackage;
import edu.pku.sei.modeler.model.structure.MetaShapeElement;

/**
 * @deprecated
 * @author zl
 *
 */
public class TemplateNodeTreeEditPart extends BaseTreeEditPart {
	public TemplateNodeTreeEditPart(MetaShapeElement model) {
        super(model);
    }
	/* (non-Javadoc)
	 * @see edu.pku.modeler.control.editparts.BaseTreeEditPart#handlePropertyChanged(java.beans.PropertyChangeEvent)
	 */
	protected void handlePropertyChanged(PropertyChangeEvent event) {
		String propertyName = event.getPropertyName();
		if(propertyName.equals(CorePackage.TEMPLATENODE_NAME)) {
			refreshVisuals();
		}
	}

	protected void refreshVisuals() {
//    	TemplateNode tpNode = (TemplateNode)((MetaShapeElement)getModel()).getElement();
//    	String body = tpNode.getName();
//    	Image image = ImageProvider.getImage(ImageProvider.TEMPLATE_NODE_IMAGE);
//    	setWidgetImage(image);
//    	if(body != null && !"".equals(body)) {
//    		setWidgetText(body);
//    	}
//    	else {
//    		setWidgetText("TemplateNode");
//    	}
    }
}
